package com.slz3.business.module.messageManagement.mesUser.steward;

import com.slz3.business.module.messageManagement.mesUser.domain.MesUser;
import com.slz3.business.module.messageManagement.mesUser.domain.MesUserCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MesUserResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MesUser.class).flatMap(mesUser ->
                MesUserResController.add(req, mesUser)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MesUserCondition.class).flatMap(mesUserCondition ->
                MesUserResController.delete(req, mesUserCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MesUser.class).flatMap(mesUser ->
                MesUserResController.modify(req, mesUser)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return MesUserResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return MesUserResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return MesUserResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MesUserCondition.class).flatMap(mesUserCondition ->
                MesUserResController.auditSubmit(req, mesUserCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MesUserCondition.class).flatMap(mesUserCondition ->
                MesUserResController.audit(req, mesUserCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MesUserCondition.class).flatMap(mesUserCondition ->
                MesUserResController.auditReject(req, mesUserCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MesUserCondition.class).flatMap(mesUserCondition ->
                MesUserResController.usingEnable(req, mesUserCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MesUserCondition.class).flatMap(mesUserCondition ->
                MesUserResController.usingDisable(req, mesUserCondition)
        );
    }   

}
